<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入外部jquery文件 -->
    <script src="js/jquery-1.8.3.js"></script>
    <script>
        $(document).ready(function() {
            // $("#login-btn").click() 监听点击事件
            $("#login-btn").click(function() {
                // $("#login").html() 设置或返回所选元素的内容
                $("#login").html("欢迎您，<b>张三！</b>");
            });

            $("#ganfan-btn").click(function() {
                // $("#img-id-1").attr() 设置或返回所选元素的属性
                // $("#img-id-1").attr("width","400");
                $("#img-id-1").attr({
                    "width": "400",
                    "height": "400"
                });
            });
        });
    </script>
</head>

<body>
    <p id="login">亲，请登录</p>
    <button id="login-btn">login</button>
    <br>
    <img src="images/eat.png" alt="干饭一碗" width="200" height="200" id="img-id-1" class="img-class-1">
    <br>
    <button id="ganfan-btn" onclick="xx()">干饭</button>
</body>

</html>